import * as ActionTypes from '../actionTypes';

export const counter = (state = 0, action) => {
  switch (action.type) {
    case ActionTypes.INCREMENT:
      return state + 1;
    case ActionTypes.INCREMENT_ASYNC:
        return state + 1;
    case ActionTypes.DECREMENT:
        return state - 1;   
    case ActionTypes.DECREMENT_ASYNC:
        return state - 1;
    default:
      return state;
  }
}